<div class="form">

<?php	 	  /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array(
    'id'=>'horizontalForm',
    'type'=>'horizontal',
	'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>
 
<fieldset>
 
   <legend>Form Data Kepegawaian</legend>
   <p class="note">Fields with <span class="required">*</span> are required.</p>
	<div id="form-kiri">
	

	<?php	 	  echo $form->errorSummary($model); ?>
	<div class="row">
		<?php	 	  echo $form->labelEx($model,'nip'); ?>
		<?php	 	  echo $form->textField($model,'nip',array('size'=>50,'maxlength'=>50)); ?>
		<?php	 	  echo $form->error($model,'nip'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'nama'); ?>
		<?php	 	  echo $form->textField($model,'nama',array('size'=>60,'maxlength'=>255)); ?>
		<?php	 	  echo $form->error($model,'nama'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'tempat_lahir'); ?>
		<?php	 	  echo $form->textField($model,'tempat_lahir',array('size'=>50,'maxlength'=>50)); ?>
		<?php	 	  echo $form->error($model,'tempat_lahir'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'tanggal_lahir'); ?>
		<?php	 	 
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'model' => $model,
            'attribute' => 'tanggal_lahir',
           // 'value' => '1980-01-01',
            'options' => array(
                'dateFormat' => 'yy-mm-dd',
                'changeMonth' => 'true',
                'changeYear' => 'true',
                'showButtonPanel' => 'true',
                'constrainInput' => 'false',
                'duration' => 'fast',
                'showAnim' => 'slide',
            ),
        ))
        ?>
		<?php	 	  echo $form->error($model,'tanggal_lahir'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'jenis_kelamin'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'jenis_kelamin',CHtml::listData(Master::model()->findAll('tipe_id=1'), 'id', 'nama_master' ), array('prompt'=>'Pilih Jenis Kelamin')); ?>
		<?php	 	  echo $form->error($model,'jenis_kelamin'); ?>
	</div>
	
	<div class="row">
		<?php	 	  echo $form->labelEx($model,'agama'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'agama',CHtml::listData(Master::model()->findAll('tipe_id=2'), 'id', 'nama_master' ), array('prompt'=>'Pilih Agama')); ?>
		<?php	 	  echo $form->error($model,'agama'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'alamat'); ?>
		<?php	 	  echo $form->textArea($model,'alamat',array('rows'=>6, 'cols'=>50)); ?>
		<?php	 	  echo $form->error($model,'alamat'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'telepon'); ?>
		<?php	 	  echo $form->textField($model,'telepon',array('size'=>50,'maxlength'=>50)); ?>
		<?php	 	  echo $form->error($model,'telepon'); ?>
	</div>

	
	
	</div>
	<div id="form-kanan">
	
	<div class="row">
		<?php	 	  echo $form->labelEx($model,'email'); ?>
		<?php	 	  echo $form->textField($model,'email',array('size'=>50,'maxlength'=>50)); ?>
		<?php	 	  echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'status_pernikahan'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'status_pernikahan',CHtml::listData(Master::model()->findAll('tipe_id=3'), 'id', 'nama_master' ), array('prompt'=>'Pilih Status Pernikahan')); ?>
		<?php	 	  echo $form->error($model,'status_pernikahan'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'jumlah_anak'); ?>
		<?php	 	  echo $form->textField($model,'jumlah_anak'); ?>
		<?php	 	  echo $form->error($model,'jumlah_anak'); ?>
	</div>
	
	<div class="row">
		<?php	 	  echo $form->labelEx($model,'satker'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'satker',CHtml::listData(Satker::model()->findAll(), 'id', 'nama_satker' ), array('prompt'=>'Pilih Satker')); ?>
		<?php	 	  echo $form->error($model,'satker'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'bidang'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'bidang',CHtml::listData(Master::model()->findAll('tipe_id=4'), 'id', 'nama_master' ), array('prompt'=>'Pilih Bidang')); ?>
		<?php	 	  echo $form->error($model,'bidang'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'status_pegawai'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'status_pegawai',CHtml::listData(Master::model()->findAll('tipe_id=5'), 'id', 'nama_master' ), array('prompt'=>'Pilih Status Pegawai')); ?>
		<?php	 	  echo $form->error($model,'status_pegawai'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'golongan_cpns'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'golongan_cpns',CHtml::listData(Master::model()->findAll('tipe_id=6'), 'id', 'nama_master' ), array('prompt'=>'Pilih Golongan CPNS')); ?>
		<?php	 	  echo $form->error($model,'golongan_cpns'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'jabatan_struktural'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'jabatan_struktural',CHtml::listData(Master::model()->findAll('tipe_id=8'), 'id', 'nama_master' ), array('prompt'=>'Pilih Jabatan Struktural')); ?>
		<?php	 	  echo $form->error($model,'jabatan_struktural'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'jabatan_funsional'); ?>
		<?php	 	  echo CHtml::activeDropDownList($model,'jabatan_funsional',CHtml::listData(Master::model()->findAll('tipe_id=7'), 'id', 'nama_master' ), array('prompt'=>'Pilih Jabatan Fungsional')); ?>
		<?php	 	  echo $form->error($model,'jabatan_funsional'); ?>
	</div>

	<div class="row">
		<?php	 	  echo $form->labelEx($model,'photo'); ?>
		<?php	 	  $this->widget('CMultiFileUpload', array('name'=>'photo', 'max'=>'1', 'remove'=>'Hapus')); ?>
                <div><?php	 	  echo $model->photo; ?></div>
		<?php	 	  echo $form->error($model,'photo'); ?>
	</div>
	
	</div>
	<hr />

	<div class="form-actions">
    <?php	 	  $this->widget('bootstrap.widgets.BootButton', array('buttonType'=>'submit', 'type'=>'primary', 'icon'=>'ok white', 'label'=>'Submit')); ?>
    <?php	 	  $this->widget('bootstrap.widgets.BootButton', array('buttonType'=>'reset', 'icon'=>'remove', 'label'=>'Reset')); ?>
</div>
</fieldset>
<?php	 	  $this->endWidget(); ?>

</div><!-- form -->